/**
* @stylesheet api.less API
* @parent Styles.docs

* @description
* Styles the docs and overwrites some of the theme default styles.
**/


/**
* @styles simple-tag Simple Tag
*
* @description
* Simple tags are styled independently from parent containers, and are different from the `ul.tags li` elements.
*
* @demo demos/simple-tag.html
**/
.simple-tag {
  display: inline-block;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  background-color: @colorTags;
  color: @clear;
  font-size: 12px;
  margin-left: 5px;
  padding: 2px 8px;
}


/**
* @styles docs-title Title Section

* @description
* Styles the title section that shows as the top of each document. It is composed by
* a `.heading`, `tags`, a `subheading`, and a list of `links`.
*
* @demo demos/title-section.html
**/
.docs {
  .title {
    display: block;
    border-bottom: 1px solid @fog;
    .heading {
    	position: relative;
    	margin: 0; 
    	h1 {
    	  margin: 0;
    	  display: inline-block;
        max-width: 550px;
        word-wrap: break-word;
    	}		  
      .module {
      	position: absolute;
      	right: 0;
      	display: inline-block;
      	top: 10px;
      }
      ul.tags {
        	margin-bottom: 0 !important;
      	  text-align: left;
        	display: inline-block;
      }
    }
    h2,h3 {
    	display: inline-block;
    }
    h2 {
    	margin: 0;
    	code {
    		background: none;
    		color: @thunderStorm;
    		font-size: 18px;
    		font-weight: bold;
    	}
    }
    .sub-heading, ul.links {
    	float: left;
    	display: block;
    	width: 50%;
    	box-sizing: border-box;
    	margin: 0;
    }
    ul.links {
    	margin-bottom: 16px;
    }
    .links, 
    .tags {
      list-style: none;
      margin: 0;
      text-align: right;
      padding: 0;
    }
    .tags {
      display: inline-block;
      margin: 0;
      position: relative;
      top: -5px;
          li {
            .simple-tag();
          }
    }
    .links li {
      display: inline-block;
      margin-top: 1px;
      &:before {
        content: '|';
        padding-right: 5px;
        padding-left: 3px;
      }
      &:first-child:before {
        content: none;
        padding: none;
      }
    }
  }
  h1 {
    margin: 0;
    display: inline-block;
  }
  .module,  .inherits,  .title .links li {
    font-size: 14px;
    color: @cloud;
    font-weight: normal;
    font-style: normal;
  }
  .inherits {
    display: block;
  }
}


// Docs General Styles
.docs {	
  .content.docs {
    width: 662px;
    margin-top: 20px;
    padding: 20px;
    ul, ol:not(.linenums) {
    	margin-left: 0;
    	.p;
    	line-height: 18px;
    }

    .iframe_wrapper iframe {
      width: 100%;
      border: 1px solid @haze;
    }
  }
  .contents li {
    line-height: 24px;
  }
  .contents ul li {
    list-style-type: square;
  }
  footer {
    margin-top: 20px;
  }
}

/**
* @styles docs-warning Docs Warning
*
*
* @demo demos/docs-warning.html
**/
.docs {
  .warning {
    background-color: fade(@sunset, 10%);
    h3 {
      background-color: @sunset;
      color: @clear;
      font-size: 18px;
      line-height: 24px;
      margin: 0;
      -webkit-border-top-left-radius: 4px;
      -webkit-border-top-right-radius: 4px;
      -moz-border-radius-topleft: 4px;
      -moz-border-radius-topright: 4px;
      border-top-left-radius: 4px;
      border-top-right-radius: 4px;
      padding: 3px 15px;
    }
  }
}


// Styles the wrapper of the sidebar and content of the docs.
.container.api {
	display: table;
	table-layout: fixed;
	padding-top: 20px;
  min-height: ~"calc(100vh - 174px)";
}
.container.api > * {
	display: table-cell !important;
	vertical-align: top;
}


// Search Styles. Currently search is not being shown.
.search-wrapper {
  position: relative;
  visibility: hidden;
  display: none;
}
.search {
  display: block;
  border: 1px solid @haze;
  padding: 3px 3px 3px 30px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  -moz-box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin: 8px;

  input[type='text']:focus, input[type='text']:enabled {
    border-color: none;
    outline: none;
  }

  input[type='text'] {
    display: block;
    border-style: none;
    background-color: rgba(255, 255, 254, 0);
    width: 100%;
  }
  &:before {
    font-family: Bitstrap;
    content: "\e012";
    display: block;
    position: absolute;
    left: 17px;
    color: @clear;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.49);
  }
}


/**
* @styles signature Signature
*
* @description
* Used as a wrapper for parameters and returns. The signature has space for headings, code and additional plain-language explanations.
*
* @demo demos/signature.html
**/
.docs .signature-wrapper {
  padding: 10px 15px 0;
  border: 1px solid @darkSkies;
  border-radius: 0 0 5px 5px;
  &*:last-child {
    margin-bottom: 0;
  }
}
.docs {
  .signature.collapsed :not(h2) {
    display: none;
  }
  .signature h2, .primary-options h2 {
    background-color: @colorSignature;
    color: @fog;
    font-size: 18px;
    line-height: 24px;
    margin: 0;
    -webkit-border-top-left-radius: 4px;
    -webkit-border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -moz-border-radius-topright: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 3px 15px;
    .text-shadow;
    span {
      font-size: 10px;
      font-weight: normal;
      font-style: normal;
      float: right;
    }
    
    code {
      background-color: transparent;
      color: @clear;
    }
    a {
      color: @clear;
    }
  }
}

/**
* @styles small-signature Small Signature
*
* @demo demos/small-signature.html
**/
.small-signature {
  padding: 10px;
  background-color: @fog;
  border: 1px solid @haze;
  margin-bottom: 10px;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  
  a.sig {
    text-decoration: none;
    color: @night;
    display: block;
    font-weight: bold;
    code, code * {
      background-color: none;
      font-weight: bold;
      background-color: transparent;
    }
    .pln {
      color: black;
    }
  }
  
  p {
    color: @thunderStorm;
    line-height: 15px;
    margin-bottom: 0px;
    margin-left: 10px;
    margin-right: 10px;
  }
}


/**
* @styles parameters-returns Parameters and Returns
*
* @description 
* Parameters and returns are shown inside of `.signature` but their styles are not dependant on it.
*
* @demo demos/parameters-returns.html
**/
.docs {
  .parameters, .returns {
    list-style-type: none;
    margin: 0 0 15px;
    border: 1px solid @haze;
    background-color: @fog;
    padding: 0px 15px 10px;
    border-radius: 5px;
  }
  .parameters h4, .returns h4 {
    background-color: @colorParamsReturns;
    padding: 4px 15px;
    color: @fontColorParamsReturns;
    margin: 0px -15px 5px;
    .optional {
  		font-size: 10px;
  		line-height: 19px;
    }
    a {
      color: @haze;
      text-decoration: none;
    }
    a:hover {
      text-decoration: underline;
    }
  }
  .parameters li:first-child h4,
  .returns h4  {
      border-radius: 5px 5px 0 0;

  }
  .parameters h5, .returns h5 {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 5px;
    color: @darkSkies;
  }
  .parameters h4 code, .returns h4 code {
    font-style: italic;
    font-weight: normal;
    background: none;
    background-color: none;
  }
  .parameters .options {
    margin-right: 50px;
  }
  .parameters .options .option, 
  .returns .options .option {
    margin: 0 -10px 15px;
    list-style-type: none;
    border-top: 1px solid @haze;
    list-style-type: none;
    padding: 15px 25px 0 25px;
  }
  .parameters .optional {
    font-size: 8pt;
    line-height: 20px;
  }
}
.docs .parameters ul.options:last-child,
.docs .returns ul.options:last-child {
  margin-bottom: 0;
}
.docs .parameters .description,
.docs .returns .description {
  padding-bottom: 15px; 
}
.docs .returns .description {
  margin-top: 15px;
}
.docs .parameters :last-child .description,
.docs .returns :last-child .description {
  margin-bottom: 0px;
  padding-bottom: 0px;
}


// demo
.docs {
  .demo {
    ul {
      list-style: none;
      padding: 0;
    }
    li.tab {
      display: block;
      float: left;
      padding: 0.25em 0.5em;
      border-radius: 4px 4px 0 0;
      cursor: pointer;
      transition: background-color 50ms ease;
      &:first-of-type {
        margin-left: 5px;
      }
      &:hover, &:focus {
        background-color: #f8f8f8;
      }
    }
    li.tab.active {
      color: @clear;
      font-weight: bold;
      background-color: @nigthRain;
      .text-shadow;
    }
    div.tab-content {
      clear: both;
    }
    iframe {
      width: 100%;
      border: 1px solid @haze;
      border-radius: 5px;
    }
  }
  body.style-demo {
    background-color: @clear;
    padding: 10px;
  }
}


#low {
	.container;
	font-size: 12px;
	margin-bottom: 15px;
}
.api {
  .group_0 {
    margin-bottom: 40px;
  }
}


